#define _CRT_SECURE_NO_WARNINGS 1


#include<iostream>
#include<vector>

using namespace std;

struct ListNode 
{
	int val;
	ListNode* next;

	ListNode() 
		:val(0)
		,next(nullptr) 
	{ }

	ListNode(int x) 
		:val(x)
		,next(nullptr) 
	{ }

	ListNode(int x, ListNode* next) 
		:val(x)
		,next(next) 
	{ }
};

void Func(vector<int>& v, int left, int right)
{
	while (left < right)
	{
		swap(v[left], v[right]);
		left++;
		right--;
	}
}

ListNode* reverseKGroup(ListNode* head, int k)
{
	vector<int> v;
	ListNode* cur = head;

	while (cur)
	{
		v.push_back(cur->val);
		cur = cur->next;
	}

	int left = 0, right = left + k;
	return nullptr;
}

void ListPushBack(ListNode** pphead, int x)
{
	ListNode* new_node = new ListNode(x);

	if (*pphead == nullptr)
	{
		*pphead = new_node;
	}
	else
	{
		ListNode* cur = *pphead;
		
		while (cur->next)
		{
			cur = cur->next;
		}

		cur->next = new_node;
	}
}

int main()
{
	ListNode* plist;

	for (int i = 0; i < 5; i++)
	{
		ListPushBack(&plist, i + 1);
	}

	return 0;
}